home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13591 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

  1. Path: newsfeed.internetmci.com!panix!cmcl2!news!schonberg!dewar
  2. From: dewar@cs.nyu.edu (Robert Dewar)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 26 Mar 1996 08:26:47 -0500
  6. Organization: Courant Institute of Mathematical Sciences
  7. Message-ID: <dewar.827846475@schonberg>
  8. References: <JSA.96Feb16135027@organon.com> <4ikbar$g0k@tpd.dsccc.com>     <adaworksDoL573.7vs@netcom.com> <JSA.96Mar21160427@organon.com>     <4iupk7$5t4@tpd.dsccc.com> <JSA.96Mar25205417@organon.com>
  9. NNTP-Posting-Host: schonberg.cs.nyu.edu
  10. X-Newsreader: NN version 6.5.0 (NOV)
  11.  
  12. "A Thompson guy could better answer this.  I would be surprised
  13. if Gnat and ObjectAda didn't compile things with little or no
  14. modification.  Heck, I've taken large chuncks of VAX Ada and moved
  15. them to Gnat with no changes.  Of course, these did not have any
  16. OS specific stuff in them."
  17.  
  18. That should be true providing you stick to the subset of the language in
  19. terms of annexes that ObjectAda implements. GNAT is the only Ada 95
  20. compiler so far that implements all the annexes, so if you take advantage
  21. of this, your code will not be easily portable to other compilers not
  22. supprting these annexes. 
  23.  
  24. Moving large chunks of VAX Ada is not a test, since that is Ada 83 code.
  25.  
  26. The question was whether GNAT code can be moved to ObjectAda. Note also
  27. that GNAT implements a number of implementatoin dependent pragmas
  28. and attributes. If you are using any of these, you will have to check
  29. whether the other compiler does too. FOr example, if you are using the
  30. pragmas to provide interoperability between C++ classes and Ada tagged
  31. types, you may have a hard time moving your code. Not only may the pragmas
  32. not exist, but there simply may be no such interoperability, since it is
  33. not rquired by the standard.
  34.  
  35. As always, if you want to write highly portable code, stay away from
  36. implementation dependent features, and make sure the compilers support
  37. the same feature sets.
  38.  
  39. Of course porting code from one GNAT implementation to another is much
  40. less of a problem, and since GNAT is available on many platforms, with
  41. more being added all the time, this form of portability will be enough
  42. for many users of Ada 95 :-)
  43.  
  44. Robert Dewar
  45. Ada Core Technologies
  46.  
  47.